#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# @Project : chat_model 
# @File    : embedding_server_schema.py
# @IDE     : PyCharm 
# @Author  :ZH
# @Time    : 2025/1/10 11:39
from typing import List, Optional

from pydantic import Field, BaseModel
from datetime import datetime

from apps.utils.enumerate import EmbeddingServerEnum


class BaseEmbeddingServerSchema(BaseModel):
    embedding_name: str = Field(description='向量服务名称', title='embedding_name')
    server_base_url: str = Field(description='向量服务地址', title='server_base_url')
    vector_store_id: int = Field(description='向量存储库id', title='vector_store_id')
    dimension: int = Field(description='向量维度', title='dimension')
    table_name: str = Field(description='向量表名', title='table_name')
    other_config: dict = Field(description='其他配置', title='other_config')
    server_type: EmbeddingServerEnum = Field(description='向量服务类型', title='server_type')
    api_key: str = Field(description='api key', title='api_key')
    model_name: str = Field(description='模型名称', title='model_name')
    description: str = Field(description='描述', title='description')
    is_default: bool = Field(description='是否默认', title='is_default')


class CreateEmbeddingServerSchema(BaseModel):
    __doc__ = "创建向量服务模式"


class UpdateEmbeddingServerSchema(BaseModel):
    __doc__ = "更新向量服务模式"
